<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>系统信息表</title>
<jsp:include page="/WEB-INF/backstage/util.jsp" />
<script type="text/javascript">
function test(obj) {
	if(obj.value == "true ") {
		obj.value = "false";
	} else {
		obj.value = "true";
	}

	var num = document.getElementsByName("num");
	for(var i = 0; i < num.length; i++) {
		num[i].checked = !num[i].checked;
	}
}


$(document).ready(function() {
			$("#btn").click(function() {//绑定
				/* alert("ghvvv");  */
				document.forms[0].action ="/bsc/bis_wechat_record/list";
				document.forms[0].submit();

			});
			//删除全选和单选
			$("#deleteBtn").click(function(obj) {//绑定
								var array = "";
								var num = document
										.getElementsByName("num");
								for (var i = 0; i < num.length; i++) {
									if (num[i].checked) {
										array += num[i].value + ",";
									}
								}
								if (array.length > 0) {
									array = array.substring(0,
											array.length - 1);
									document.forms[0].action = "/bsc/bis_wechat_record/delete?ids="
											+ array;
									document.forms[0].submit();
								} else {
									alert("你还未选取数据");
								}
							});
		});
</script>
</head>
<body>
<form action="" method="post" class="form-inline">
<label for="opinion_id">收件人:</label><input type="text" name="record_id">
<label for="opinion_id">收件人账号：</label><input type="text" name="send_user_id">
 <label for="opinion_id">内容：</label><input type="text" name="content">
 <label for="opinion_id">发起时间：</label><input type="date" name="send_time1">至<input type="date" name="send_time2">
<input type="submit" value="提交" class="btn btn-primary">
<input type="reset" value="重置" class="btn btn-primary"><br>
<input type="button" id="btn" value="发送信息" class="btn btn-primary">
<input type="button" id="deleteBtn" value="删除" class="btn btn-primary">
<table  border="1" width="100%" class="table-hover table-condensed table-bordered">
<tr>
<td><input type="checkbox" name="" id="" onclick="test(this)" />收件人</td>
<td>收件人账号</td>
<td>内容</td>
<td>发送时间</td>
</tr>
<c:forEach items="${ Bis_wechat_record}" var="Bis_wechat_record">
<tr>
<td> <input type="checkbox" name="num" value="${Bis_wechat_record.record_id }"/>${Bis_wechat_record.record_id }</td>
<td>${Bis_wechat_record.send_user_id}</td>
<td>${Bis_wechat_record.content }</td>
<td><fmt:formatDate value="${Bis_wechat_record.send_time }" pattern="yyyy-MM-dd"/> </td>
</tr>
</c:forEach>
</table>
一共1页,3条,当前在0,每页显示:5,当前页3
	<a href="#" onclick="upPage1()">上一页</a>
	<a href="#" onclick="nextPage1()">下一页</a>
	<a href="#" onclick="firstPage1()">首页</a>
	<a href="#" onclick="lastPage1()">尾页</a>
	<input type="text" size="3" name="page" id="page">
	<button type="button" onclick="tiaozhuan()">跳转</button>

</form>
<script>
//上一页
function upPage1(){
	pageForm.action="/bsc/bis_wechat_record/selectbis_wechat_record?page=0";
	pageForm.submit();
}
//下一页
function nextPage1(){
	pageForm.action="/bsc/bis_wechat_record/selectbis_wechat_record?page=1";
	pageForm.submit();
}
//首页
function firstPage1(){
	pageForm.action="/bsc/bis_wechat_record/selectbis_wechat_record?page=1";
	pageForm.submit();
}
//尾页
function lastPage1(){
	pageForm.action="/bsc/bis_wechat_record/selectbis_wechat_record?page=1";
	pageForm.submit();
}
//跳转
function tiaozhuan(){
	var page=$("#page").val();
	if(page>'1'){
		alert("没有这么多页..");
		return;
	}
	pageForm.action="/bsc/bis_wechat_record/selectbis_wechat_record";
	pageForm.submit();
}
</script>

</body>
</html>